package testClass;

public class Test4 {
    public static void main(String[] args) {
        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
        System.out.println("系统类加载器"+systemClassLoader);

        //查看Student类由哪个类加载器加载
        Student student=new Student();
        ClassLoader classLoader = student.getClass().getClassLoader();
        System.out.println("student类的类加载器"+classLoader);

        ClassLoader parent = classLoader.getParent();
        System.out.println("父级类加载器"+parent);

        ClassLoader parent1 = parent.getParent();
        System.out.println("扩展的类加载器的父类"+parent1);
    }
}
